/**
 * Created by zhuyufeng on 2015/12/30.
 */
Ext.define('heal', {
	extend: 'Ext.data.Model',
	fields: [ 'date', 'unit']
});
var healStore = Ext.create('Ext.data.Store', {
	model: 'heal',
	autoLoad: true,
	pageSize: 4,
	proxy: {
		type: 'ajax',
		url : './json/health.json',
		reader: {
			type: 'json',
			root: 'rows',
			totalProperty: 'total'
		}
	}
});
var health = Ext.create('Ext.grid.Panel', {
	store: healStore,
	height:440,
	forceFit:true,
	columnWidth:.499,
	title: '卫生情况',
	columns: [
		{
			text: '日期',
			width: 100,
			dataIndex: 'date'
		},
		{
			text: '卫生等级',
			width: 150,
			dataIndex: 'unit'
		}
	],
	dockedItems:[{
		xtype:'pagingtoolbar',
		store:healStore,
		dock:'bottom',
		displayInfo:true,
		displayMsg:'第{0}条到第{1}条,一共{2}条',
		emptyMsg:'没有记录'
	}]
});
